package cn.novel.bm.domain.novel;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Type;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import java.util.Date;
import java.util.UUID;

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "集数")
public class Episode {

    @Id
    @Type(type = "org.hibernate.type.PostgresUUIDType")
    private UUID episodeId;
    private String episodeName;
    private Integer episodeNo;
    private Integer wordsCount;
    private Integer status;

    private Date createAt;
    private Date updateAt;
    @ManyToOne
    private Novel novel;
}
